import request from '@/utils/request'
import { encryptedData } from '@/utils/encrypt'
import { loginRSA, tokenName } from '@/config'

// export async function login(data) {
//   if (loginRSA) {
//     data = await encryptedData(data)
//   }
//   return request({
//     url: '/manage/user/loginManage',
//     method: 'post',
//     data,
//   })
// }

export function getUserInfo() {}

export function login(data) {
  return request({
    url: '/manage/user/loginManage',
    method: 'post',
    data,
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post',
  })
}

export function register() {
  return request({
    url: '/register',
    method: 'post',
  })
}

export function getUserPage(params) {
  return request({
    url: '/manage/user/userList',
    method: 'post',
    data: params,
  })
}
